How can I resolve mypy errors with binary tree functions in Python

visit shbcf.ru